package tag.doABC2
{
	import flash.utils.ByteArray;
	
	import array.DoubleArray;
	import array.IntArray;
	import array.MultinameArray;
	import array.NsArray;
	import array.NsSetArray;
	import array.StringArray;
	import array.UIntArray;

	public class CPool
	{
		/** 整型数组*/
		public var cp_int:IntArray = null;
		
		/** 无符号整型数组*/
		public var cp_uint:UIntArray = null;
		
		/** 双精度数组*/
		public var cp_double:DoubleArray = null;
		
		/** 字符串数组*/
		public var cp_string:StringArray = null;
		
		/** 命名空间数组*/
		public var cp_namespace:NsArray = null;
		
		/** 命名空间集数组*/
		public var cp_nsset:NsSetArray = null;
		
		/** 复合名字数组*/
		public var cp_multiname:MultinameArray = null;
		
		public function CPool()
		{
			
		}
		
		public function handler(bytes:ByteArray):void
		{
			this.reset();
			cp_int.fill(bytes);
			cp_uint.fill(bytes);
			cp_double.fill(bytes);
			cp_string.fill(bytes);			
			cp_namespace.fill(bytes, cp_string);
			cp_nsset.fill(bytes, cp_namespace);
			cp_multiname.fill(bytes, cp_string, cp_namespace, cp_nsset);
		}
		
		private function reset():void
		{
			cp_int = new IntArray();
			cp_uint = new UIntArray();;			
			cp_double = new DoubleArray();			
			cp_string = new StringArray();
			cp_namespace = new NsArray();
			cp_nsset = new NsSetArray();
			cp_multiname = new MultinameArray();
		}
	}
}